home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 22
/
Amiga Format AFCD22 (Jan 1998, Issue 106).iso
/
-seriously_amiga-
/
shareware
/
programming
/
other
/
a68kenh
/
near.asm
< prev
Wrap
Assembly Source File
|
1997-11-05
|
847b
|
58 lines
; This file assumes that the '-m0' option is used on the command line
;
;
;
SECTION CODE
;
; Superfluous at start of program (Makes program easier to read?)
;
FAR
;
; Easy to code but generates longer, slower instructions
;
MOVE.L eins,D0
SUB.L zwei,D0
ADD.L drei,D0
;
; Set register to point at start of data section
;
LEA DataStart,A4
;
; Lots of typing but generates shorter, faster instructions
;
MOVE.L eins-DataStart(A4),D0
SUB.L zwei-DataStart(A4),D0
ADD.L drei-DataStart(A4),D0
;
; Nifty directive
;
NEAR A4 ; 'A4' is default - coded for clarity
;
; Now that 'NEAR' is active, the '-DataStart(A4)' is no longer needed
;
MOVE.L eins,D0
SUB.L zwei,D0
ADD.L drei,D0
;
;
;
RTS
;
; Only one data section can be declared if 'NEAR' is to be used
;
SECTION data
;
;
;
DataStart
;
;
;
eins dc.l 1
zwei dc.l 2
drei dc.l 3
;
;
;
end